package com.chinatgl.latte.ec.main;

import android.graphics.Color;
//这些在核心代码层里面 通用的
import com.chinatgl.latte.delegates.bottom.BaseBottomDelegate;
import com.chinatgl.latte.delegates.bottom.BottomItemDelegate;
import com.chinatgl.latte.delegates.bottom.BottomTabBean;
import com.chinatgl.latte.delegates.bottom.ItemBuilder;
import com.chinatgl.latte.ec.DiscoverDelegate;
import com.chinatgl.latte.ec.R;
import com.chinatgl.latte.ec.main.cart.CartDelegate;
import com.chinatgl.latte.ec.main.index.IndexDelegate;
import com.chinatgl.latte.ec.main.personal.PersonalDelegate;
import com.chinatgl.latte.ec.main.sort.SortDelegate;

import java.util.LinkedHashMap;

/**
 * 文件描述: 最底层的界面
 * 作者: Created by 杨伟乔 on 2017/8/9 0009.
 * 版本号: 1.0
 */

public class EcBottomDelegate extends BaseBottomDelegate {

    @Override
    public LinkedHashMap<BottomTabBean, BottomItemDelegate> setItems(ItemBuilder builder) {
        final LinkedHashMap<BottomTabBean, BottomItemDelegate> items = new LinkedHashMap<>();
        items.put(new BottomTabBean(R.drawable.icon_home_nor, "主页"), new IndexDelegate());
        items.put(new BottomTabBean(R.drawable.icon_classification_nor, "分类"), new SortDelegate());
    //  items.put(new BottomTabBean(R.drawable.icon_alliance_nor, "联盟圈"), new DiscoverDelegate());
        items.put(new BottomTabBean(R.drawable.icon_shopping_cart_nor, "购物车"), new CartDelegate());
        items.put(new BottomTabBean(R.drawable.icon_me_nor, "我的"), new PersonalDelegate());
        return builder.addItems(items).build();
    }

    @Override
    public int setIndexDelegate() {
        return 0;
    }

    @Override
    public int setClickedColor() {
        return Color.parseColor("#333333");
    }
}
